<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>07-SVG的组合和复用</title>
    <style>
      body {
        margin: 0;
        padding: 0;
        background-image: url(../images/grid.png);
      }
      svg {
        background-color: rgba(255, 0, 0, 0.1);
      }
    </style>
  </head>
  <body>
    <svg width="300" height="300" xmlns="http://www.w3.org/2000/svg">
      <circle cx="50" cy="50" r="25" fill="transparent" stroke="red"></circle>
      <circle cx="80" cy="50" r="25" fill="transparent" stroke="red"></circle>
      <circle cx="110" cy="50" r="25" fill="transparent" stroke="red"></circle>
      <circle cx="140" cy="50" r="25" fill="transparent" stroke="red"></circle>

      <!-- g 元素没有专属的属性，只有全局的属性，如 id、class、style、fill、onclick ... -->
      <g fill="transparent" stroke="red">
        <circle cx="50" cy="100" r="25"></circle>
        <circle cx="80" cy="100" r="25"></circle>
        <circle cx="110" cy="100" r="25"></circle>
        <circle cx="140" cy="100" r="25"></circle>
      </g>
    </svg>
  </body>
</html>
